use "us_census1880.dta"
rename stateicp state
gen stateicp = state
gen mixed = 0 if raced==200
replace mixed = 1 if raced==210
gen liter = 1 if lit==4
replace liter = 0 if lit<4
merge m:1 stateicp countyicp using "1800_countystats.dta"
*Graph for Figure 5
binscatter sei _whitemaleshare if labforce==2 & _slaveshare>0, by(mixed) controls(_whiteshare _slaveshare _slaverate age sex liter urban) ylab(, nogrid) xlab(, nogrid)
*Results for Appendix Table D.10
reg sei mixed _whiteshare _whitemaleshare _slaveshare _slaverate age sex liter urban if labforce==2 & _slaveshare>0,vce(cluster countyicp)
reg sei i.mixed##c._whiteshare i.mixed##c._whitemaleshare _slaveshare _slaverate age sex liter urban if labforce==2 & _slaveshare>0,vce(cluster countyicp)
reg sei i.mixed##c._whiteshare i.mixed##c._whitemaleshare _slaveshare _slaverate age sex liter urban i.state if labforce==2 & _slaveshare>0, vce(cluster countyicp)

